<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="入驻审核列表" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="企业名称"
                               ng-model="condition.companyName">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
                 reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">企业名称：</label>
                        <input type="text" name="receiverName" class="form-control" ng-model="condition.companyName">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">组织机构代码：</label>
                        <input type="text" name="orgCode" class="form-control" ng-model="condition.orgCode">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">审核人名称：</label>
                        <input type="text" name="auditName" class="form-control" ng-model="condition.auditName">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">审核状态：</label>
                        <select name="status" class="form-control" ng-model="condition.status"
                                ng-options="item.id as item.name for item in statusList" required yb-focus>
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="true"
                 has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tableConfig.tableCol, $index)"
                                    ng-show="!!itemCol.isShow && !!itemCol.isFixed && itemCol.type !== 'operate'">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth" fixed-width="tbStyle.scrollLeft"></div>
                                </th>
                                <th width="80" class="border-r-none">
                                    操作
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tableConfig.tableCol, $index)"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index"
                                ng-class="{'row-selected': $index === markInfo.cueRow}" ng-click="selectRow($index)">
                                <td class="spill-dots border-l-none" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                    width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !!itemCol.isFixed && itemCol.type !== 'operate'"
                                    title="{{item[itemCol.dataField]}}">
                                    {{item[itemCol.dataField]}}
                                </td>
                                <td width="80" class="font-0 border-l-none border-r-none">
                                    <button class="btn btn-operate m-r-xs" ng-click="auditData(item)"
                                            ng-disabled="item.status !== 1 || !btnPermission.companyAudit" title="{{!btnPermission.companyAudit?'无权限执行此操作':''}}">审核</button>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index"
                                ng-class="{'row-selected': $index === markInfo.cueRow}"
                                ng-click="selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    {{item[itemCol.dataField]}}
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="审核" active="activeFlag[1]" ng-if="activeFlag[1]">
            <div class="main-area d-t-35 d-b-15">
                <form name="form" class="main-wrap form-horizontal single-col p-t clearfix" novalidate>
                    <div class="form-group">
                        <label class="col-xs-2 control-label">企业代码：</label>
                        <label class="col-xs-5 control-label text-left">{{detailInfo.receiverId}}</label>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label">企业名称：</label>
                        <label class="col-xs-5 control-label text-left">{{detailInfo.companyName}}</label>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label">组织机构代码：</label>
                        <label class="col-xs-5 control-label text-left">{{detailInfo.orgCode}}</label>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label">邀请方：</label>
                        <label class="col-xs-5 control-label text-left">{{detailInfo.senderName}}</label>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label">邀请日期：</label>
                        <label class="col-xs-5 control-label text-left">{{detailInfo.createdDate | YbDate}}</label>
                    </div>
                    <div class="form-group m-b-xs">
                        <label class="col-xs-2 control-label">是否调用SAP接口：</label>
                        <label class="col-xs-5 control-label p-l-n text-left">
                            <input type="radio" class="m-r-md pull-left" yb-radio ng-model="detailInfo.isSap" value="1"
                                   yb-radio-name="是">
                            <input type="radio" class="m-r-md pull-left" yb-radio ng-model="detailInfo.isSap" value="0"
                                   yb-radio-name="否">
                        </label>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label">SAP工厂代码：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" name="sapCode" class="form-control" ng-model="detailInfo.sapCode" maxlength="20" >
                        </div>
                    </div>
                    <div class="form-group m-b-xs">
                        <label class="col-xs-2 control-label">是否条码化管理：</label>
                        <label class="col-xs-5 control-label p-l-n text-left">
                            <input type="radio" class="m-r-md pull-left" yb-radio ng-model="detailInfo.isBarcode" value="1"
                                   yb-radio-name="是">
                            <input type="radio" class="m-r-md pull-left" yb-radio ng-model="detailInfo.isBarcode" value="0"
                                   yb-radio-name="否">
                        </label>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label"><i>*</i>审核意见：</label>
                        <div class="col-xs-5 wrapper-none">
                            <textarea type="text" name="auditRecord" class="form-control" ng-model="detailInfo.auditRecord"
                                    style="height: 100px;" yb-word-count max-size="100" placeholder="审核意见"
                                      required yb-focus></textarea>
                        </div>

                        <div class="col-xs-4 msg-block" ng-if="form.auditRecord.$dirty || (form.auditRecord.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.auditRecord.$error.required && !form.auditRecord.focused">
                                必填项，请填写
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label"></label>
                        <div class="col-xs-5 wrapper-none">
                            <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(form.$valid, 3)">通过</button>
                            <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(form.$valid, 2)">拒绝</button>
                            <button type="button" class="btn btn-default" ng-click="changeTab(0)">取消</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>